Path-Based Rules in Object-Oriented Programming
نویسندگان
چکیده
Object-oriented programming has recently emerged as one of the most important programming paradigms. While object-oriented programming clearly owes an intellectual debt to AI, it appears to be displacing some AI techniques, such as rule-based programming, from the marketplace. This need not be so as path-based rules|forward-chaining production rules that are restricted to follow pointers between objects||t into the object-oriented paradigm in a clean and elegant way. The combination of path-based rules and object-oriented programming should be useful in AI applications, and in the more general problem of transferring AI techniques to the larger computer science community. To this day, forward-chaining production rules remain largely unused in mainstream object-oriented applications. One reason for this lack of use is, of course, that many production rule systems (such as most versions of OPS (Cooper & Wogrin 1988), etc.) are written in LISP, and not in a major object-oriented language. However even in the new rule systems that claim integration with an object-oriented language, the integration is not adequate. Many of these rule systems (such as ART-IM (Inf 1987)) operate on their own data (working memory elements), not the objects of their base language. Applications thus need to move information between the working memory and object storage. Other systems (such as CERS (Miranker et al. 1993)) require special calls to bring objects of the language to the attention of the rule system. Although this means that informationdoes not need to be moved, it does require facilities outside of the object-oriented paradigm to control rules. The rules of object-oriented, production-rule systems (including the above systems, as well as ILOG) exist outside the object system, and thus are not organized in the same way as classes and objects. Further, even when the production rules directly operate on objects they still do not act like the rest of the system. In particular, production rules in all the above systems can form joins between unrelated objects, thus violating the locality assumptions implicit in object-oriented programming. However, rules have many uses within the object-oriented paradigm. Rules can be used to enforce in-variants, check constraints, react to events and states, update dependent objects, and even remove dangling pointers. Therefore, it would be useful to add rules to an object-oriented programming language in a manner that merges the rules naturally into the rest of the language. For this eeort to be a success, it must be easy for programmers who are …
منابع مشابه
Declarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey
One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...
متن کاملR++: Adding Path-Based Rules to C++
Object-oriented languages and rule-based languages ooer two distinct and useful programming abstractions. However, previous attempts to integrate data-driven rules into object-oriented languages have typically achieved an uneasy union at best. R++ is a new, closer integration of the rule-based and object-oriented paradigms that extends C++ with a single programming construct, the path-based rul...
متن کاملModelsaz: An Object-Oriented Computer-Aided Modeling Environment
Modeling and simulation of processing plants are widely used in industry. Construction of a mathematical model for a plant is a time-consuming and error-prone task. In light of extensive advancements in computer science (both hardware and software), computers are becoming a necessary instrument in industrial activities. Many software tools for modeling, simulation and optimization of proces...
متن کاملPat h-Based Rules in
Object-oriented programming has recently emerged as one of the most important programming paradigms. While object-oriented programming clearly owes an intellectual debt to AI, it appears to be displacing some AI techniques, such as rule-based programming, from the marketplace. This need not be so as pathbased rules-forward-chaining production rules that are restricted to follow pointers between...
متن کاملR++: Using Rules in Object-Oriented Designs
System requirements often express some of the behavior of a domain model in the form of policies, constraints, invariants, and rules. Although an object-oriented approach helps with the design of this model, the implementation is often cluttered with details necessary to enforce the model' s policies and constraints. As a result, the code is more prone to error and is more difficult to maintain...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1996